package top.lshaci.learning.hutool;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;

/**
 * IdUtilTest
 *
 * @author lshaci
 * @since 1.0.0
 */
public class IdUtilTest {

    public static void main(String[] args) {
        Snowflake snowflake = IdUtil.getSnowflake(1, 1);
        for (int i = 0; i < 20; i++) {
            new Thread(() -> {
                for (int j = 0; j < 20; j++) {
                    long id = snowflake.nextId();
                    System.err.println(Thread.currentThread().getName() + ":" + id);
                }
            }, "T-" + i).start();
        }
    }
}
